import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
data = pd.read_csv('bilibili_videos.csv')
interested_variables = ['播放量', '收藏数', '点赞数', '弹幕数', '评论数']
interested_data = data[interested_variables]
correlation_matrix = interested_data.corr()
plt.rcParams['font.sans-serif']=['SimHei']
plt.figure(figsize=(10, 8))
sns.heatmap(correlation_matrix, annot=True, cmap='coolwarm', fmt=".2f")
plt.title('Correlation Matrix of Variables')
plt.show()
